package cn.com.wblog.utils;

public class Pager {
	private int pageNum;
	private int numPerPage;
	private int totalCount;
	private String orderField;
	private String status;
	private String keywords;
	private int totalPages;
	
	public Pager(int pageNum, int numPerPage, int totalCount) {
		this.pageNum = pageNum;
		this.numPerPage = numPerPage;
		this.orderField = "";
		this.status = "";
		this.keywords = "";
		this.setTotalCount(totalCount);
	}
	
	
	
	public int getTotalPages() {
		return totalPages;
	}



	public void setTotalPages(int totalPages) {
		this.totalPages = totalPages;
	}



	public int getTotalCount() {
		return totalCount;
	}

	public void setTotalCount(int totalCount) {
		this.totalPages = totalCount / numPerPage + 1;
		this.totalCount = totalCount;
	}

	public int getPageNum() {
		return pageNum;
	}
	public void setPageNum(int pageNum) {
		this.pageNum = pageNum;
	}
	public int getNumPerPage() {
		return numPerPage;
	}
	public void setNumPerPage(int numPerPage) {
		this.numPerPage = numPerPage;
	}
	public String getOrderField() {
		return orderField;
	}
	public void setOrderField(String orderField) {
		this.orderField = orderField;
	}
	public String getStatus() {
		return status;
	}
	public void setStatus(String status) {
		this.status = status;
	}
	public String getKeywords() {
		return keywords;
	}
	public void setKeywords(String keywords) {
		this.keywords = keywords;
	}
	
}
